package com.jwd.avmanager.constant;


/**
 * CMD_IN_XXX代表客户端发过来的指令
 * CMD_OUT_XXX代表服务器发给客户端的指令
 */
public class Cmd {
    //=======================客户端请求指令======================

    public static final short CMD_IN_UNIVERSAL_REPLY = 0x1001;              //通用应答命令
    public static final short CMD_IN_HEARTBEAT = 0X1002;                    //心跳
    public static final short CMD_IN_HEARTBEAT_V2 = 0X1010;                    //心跳
    public static final short CMD_IN_LOGIN = 0x1003;                        //登录指令
    public static final short CMD_IN_LOGIN_V2 = 0x1013;                        //登录指令
    public static final short CMD_IN_CANCEL_TERMINAL = 0x1004;              //取消终端设备的注册
    public static final short CMD_IN_REQUEST_GPS = 0x1021;                  //GPS上传
    public static final short CMD_IN_SEND_EQUIPMENT_STATE = 0x1063;               //发送设备端当前视频通话或者集群对讲的状态
    public static final short CMD_IN_GET_SETVER_PORT = 0x1064;               //获取目标的状态及服务器地址和端口号
    public static final short CMD_IN_TALKBACK_GROUP = 0x1065;               //获取集群对讲群组列表
    public static final short CMD_IN_TALKBACK_PERSONNEL = 0x1066;           //获取集群对讲人员列表
    public static final short CMD_IN_STOP_VOICE = 0x1067;           //设备端停止语音对讲
    public static final short CMD_IN_STOP_VIDEO = 0x1068;           //设备端停止视频通话
    public static final short CMD_IN_VIDEO_PERSONNEL_LIST = 0x1069;          //获取视频通话用户列表
    public static final short CMD_IN_CALL_PERSONNEL_LIST = 0x106B;          //获取对讲组内通话人员列表
    public static final short CMD_IN_SOS_EMERGENCY = 0x1070;                 //发送SOS紧急呼叫
    public static final short CMD_IN_SOS_EMERGENCY_V2 = 0x1170;                 //发送SOS报警消息
    public static final short CMD_IN_GET_FTP_SERVER = 0x1071;                 //获取获取ftp服务器参数
    public static final short CMD_IN_UPLOADING_FILE = 0x1072;                 //提交上传成功的文件名
    public static final short CMD_IN_EXAMINE_FILE = 0x1073;                 //检查文件是否已经上传过
    public static final short CMD_IN_SEND_SHOOT_FILES = 0x1074;                 //发送已经拍摄的文件列表放

    public static final short CMD_IN_UPLOADING_QRCODE = 0x1076;                 //二维码文件上传成功后，发送命令给服务器较对

    public static final short CMD_IN_RTMP_ALTER = 0x1080;              //设备端rtmp设置发生变化
    public static final short CMD_IN_GET_UPGRADE_FILE = 0x1090;              //设备端获取升级文件包
    public static final short CMD_IN_PUSH_VIDEO = 0x1100;              //设备请求推送实时视频流（0x1100）

    public static final short CMD_IN_TARGET_STATE = 0x1301;                 //获取目标的状态及WebRTC服务器地址和端口号获取目标的状态及WebRTC服务器地址和端口号
    public static final short CMD_IN_JOIN_WEBRTC = 0x1302;                 //加入WebRTC房间
    public static final short CMD_IN_QUIT_WEBRTC = 0x1303;                 //退出WebRTC房间
    public static final short CMD_IN_CALL_PERSONNEL_LIST2 = 0x1304;          //获取对讲组内通话人员列表
    public static final short CMD_IN_WEBRTC_MESSAGE = 0x1305;                 //获取默认通话房间号及WebRTC服务器地址和端口号
    public static final short CMD_IN_SEND_VIDEO_SERCER = 0x1306;                 //发送视频通话请求到服务器
    public static final short CMD_IN_SEND_AUDIO_SERCER = 0x1307;                 //发送音频通话请求到服务器
    public static final short CMD_IN_IEMI_REGISTER = 0x1200;                //设备查询IEMI是否已经注册

    //======================服务端响应指令=====================
    public static final short CMD_OUT_EXCEPTION_RESPONSE = 0x201E;              //异常响应

    public static final short CMD_OUT_UNIVERSAL_REPLY = 0x2001;          //通用应答命令
    public static final short CMD_OUT_HEARTBEAT = 0X2010;                //心跳
    public static final short CMD_OUT_REGISTER_TERMINAL =    0x2003;        //服务器返回注册终端设备结果
    public static final short CMD_OUT_CANCEL_TERMINAL = 0x2004;          //服务器返回取消终端设备注册结果
    public static final short CMD_OUT_UPLOADING_VIDEO = 0x2021;          //服务器发送上传视频流的命令
    public static final short CMD_OUT_STOP_VIDEO = 0x2022;               //服务器发送停止上传视频流的命令
    public static final short CMD_OUT_UPLOADING_AUDIO= 0x2023;           //服务器发送上传音频流的命令
    public static final short CMD_OUT_STOP_AUDIO = 0x2024;               //服务器发送停止上传视频流的命令
    public static final short CMD_OUT_UPLOADING_RTMP = 0x2028;           //服务器发送开始上传rtmp流命令
    public static final short CMD_OUT_STOP_RTMP = 0x2029;                //服务器发送停止上传rtmp流命令
    public static final short CMD_OUT_BEGIN_MONITOR_RTMP = 0x2060;       //服务器发送监听rtmp流的命令
    public static final short CMD_OUT_STOP_MONITOR_RTMP = 0x2061;        //服务器发送停止监听rtmp流的命令
    public static final short CMD_OUT_TALKBACK_MAYBE_VIDEO = 0x2063;     //服务器查询设备端的对讲或者视频通话状态
    public static final short CMD_OUT_URL_PORT = 0x2064;                 //服务器返回对象状态及服务器地址和端口号
    public static final short CMD_OUT_TALKBACK_GROUP_LIST = 0x2065;      //服务器返回集群对讲群组列表
    public static final short CMD_OUT_TALKBACK_USER_LIST = 0x2066;       //服务器返回集群对讲用户列4060表
    public static final short CMD_OUT_STOP_VIDEO_TALKBACK = 0x4068;      //服务器发送停止视频通话的命令
    public static final short CMD_OUT_VIDEO_USER_LIST = 0x2069;          //服务器返回视频通话用户列表
    public static final short CMD_OUT_OPEN_VIDEO_CALL = 0x206A;          //服务器发送开启视频通话的命令
    public static final short CMD_OUT_MESSAGE_DEVICE = 0x2070;           //服务器发送信息到设备端            
    public static final short CMD_OUT_UPGRADE_MESSAGE = 0x2090;          //服务器返回升级包信息

    //重点
    public static final short   CMD_OUT_STOP_CONNECT = (short) 0x8000;   //服务器发送终止连接的命令


    public static final short CMD_OUT_USER_LIST = 0x206B;                //服务器返回对讲组用户列表
    public static final short CMD_OUT_CAll_LIST = 0x2304;                //WebRTC对讲组用户列表
    public static final short CMD_OUT_VIDEP_LIST = 0x2069;                //视频通话用户列表
    public static final short CMD_OUT_FTP_SERVER = 0x2071;               //服务器返回ftp服务器参数
    public static final short CMD_IN_GET_HTTP_SERVER = 0x2171;                 //获取文件上传服务器参数
    public static final short CMD_OUT_SUBMIT_FILENAME = 0x2072;          //服务器返回提交的文件名
    public static final short CMD_OUT_FILE_UPLOADING = 0x2073;           //服务器返回文件是否上传过
    public static final short CMD_OUT_PHOTOG_FILE_LIST = 0x2074;         //服务器请求返回执法仪的当前拍摄的文件列表
    public static final short CMD_OUT_UPGRADE_FILE_LIST = 0x2075;        //服务器请求上传的文件列表
    public static final short CMD_OUT_SEND_GPS = 0x2080;                 //服务器请求发送GPS数据
    public static final short CMD_OUT_IMEI_REGISTER = 0x2200;            //服务器返回IMEI注册结果
    public static final short CMD_OUT_OBJECT_WEDRTC_URL_PORT = 0x2301;   //服务器返回对象状态及WebRTC服务器地址和端口号
    public static final short CMD_OUT_LOG_WEDRTC_URL_PORT = 0x2305;      //服务器返回默认房间号及WebRTC服务器地址和端口号
    public static final short CMD_OUT_INFORM_WEDRTC_URL_PORT = 0x4301;   //通知其他用户

    public static final short CMD_OUT_WEDRTC_GROUP_USER_LIST = 0x2304;   //服务器返回WebRTC对讲组用户列表
    public static final short CMD_OUT_ROOM_WEDRTC_URL_PORT = 0x2305;     //服务器返回默认房间号及WebRTC服务器地址和端口号


    //-------------------------------------------------WebsocketServer--------------------------------------------------
    //----------------------------------------------------服务器接收-------------------------------------------------
    //TODO 文件上传查询数据
    public static final short CMD_IN_WEB_SOCKET_LOGIN = 0x5001;     //web登录
    public static final short CMD_IN_WEB_SOCKET_EXIT_LOGIN = 0x5003;     //web退出登录
    public static final short CMD_IN_WEB_SOCKET_HEARTBEAT = 0x5002;     //web端发送心跳
    public static final short CMD_IN_WEB_SOCKET_WEB_GPS = 0x5080;     //web端请求设备端发送GPS

    public static final short CMD_IN_WEB_VIDEO_MONITOR_RTMP = 0x5028;      //发送监听的rtmp流的命令 monitor
    public static final short CMD_IN_WEB_VIDEO_STOP_RTMP = 0x5029;      //服务器发送停止监听rtmp流的命令


    public static final short CMD_IN_WEB_SOCKET_VIDEO_CALL = 0x5301;     //获取WebRTC目标的状态及服务器地址和端口号
    public static final short CMD_IN_WEB_SOCKET_JOIN_WEBRTC = 0x5302;     //加入WebRTC房间
    public static final short CMD_IN_WEB_SOCKET_QUIT_WEBRTC = 0x5303;     //退出WebRTC房间

    public static final short CMD_IN_WEB_SOCKET_VIDEO_CCTV = 0x5108;     //视频监控
    public static final short CMD_IN_WEB_USER_GET_FILE = 0x5109;      //获取用户上传文件

    public static final short CMD_IN_WEB_SHOOT_MONITOR_RTMP = 0x5060;      //发送监听的rtmp流的命令 monitor      废除
    public static final short CMD_IN_WEB_SHOOT_STOP_RTMP = 0x5061;      //服务器发送停止监听rtmp流的命令           废除
    public static final short CMD_IN_WEB_SHOOT_CHAT_FILE = 0x5070;     //发服务发短信来了
    public static final short CMD_IN_WEB_SHOOT_FILE_LIST = 0x5074;     //服务器请求返回执法仪的当前发送已经拍摄的文件列表
    public static final short CMD_IN_WEB_CLOSE_FILE_LIST = 0x5174;     //关闭文件获取列表清空缓存

    public static final short CMD_IN_WEB_PUT_FILE_LIST = 0x5075;     //web端请求上传文件的列表



    //-------------------------------------------------WebsocketServer--------------------------------------------------
    //----------------------------------------------------服务器发送-------------------------------------------------
    public static final short CMD_OUT_WEB_SOCKET_LOGIN = 0x4001;        //web登录
    public static final short CMD_OUT_WEB_SOCKET_EXIT_LOGIN = 0x4003;        //web退出登录
    public static final short CMD_OUT_WEB_SOCKET_HEARTBEAT = 0x4002;        //服务器返回心跳
    public static final short CMD_OUT_WEB_SOCKET_SEND_GPS = 0x4006;        //服务器返回注册终端设备结果
    public static final short CMD_OUT_WEB_SOCKET_SEND_CELL = 0x4007;        //服务器发送设备状态变化
    public static final short CMD_OUT_WEB_SOCKET_SOS_CELL = 0x4008;        //SOS报警
    public static final short CMD_OUT_WEB_SOCKET_VIDEO_FLOWING = 0x4028;        //返回拉流地址

    public static final short CMD_OUT_WEB_SOCKET_SOS_CELL_V2 = 0x4108;        //SOS报警
    public static final short CMD_OUT_WEB_SOCKET_SET_FILE = 0x4109;        //获取用户上传文件

    public static final short CMD_OUT_WEB_SOCKET_FILE_INFORM = 0x4072;        //文件上传反馈
    public static final short CMD_OUT_WEB_SOCKET_FILE_UPLOADING = 0x4073;        //文件上传反馈
    public static final short CMD_OUT_WEB_MONITOR_RTMP = 4060;  //
    public static final short CMD_OUT_STOP_COLONY_TALKBACK = 0x4067;     //服务器发送停止集群对讲命令
    public static final short CMD_OUT_WEB_SOCKET_VIDEO_CALL = 0x4301;        //服务器返回注册终端设备结果
    public static final short CMD_OUT_WEB_SOCKET_VIDEO_DETA = 0x4120;      //   视频监控 0x4120
    public static final short CMD_OUT_WEB_SOCKET_VIDEO_CCTV = 0x4108;        //服务器返回视频监控结果

    public static final short CMD_OUT_WEB_SOCKET_FILE_TETRUN = 0x4070;        //文件发送是否成功

    public static final short CMD_OUT_WEB_SOCKET_FILE_LIST = 0x4074;        //服务器返回拍摄的文件列表
    public static final short CMD_OUT_WEB_CLOSE_FILE_LIST = 0x4174;        //服务器返回拍摄的文件列表

    public static final short CMD_OUT_WEB_SOCKET_JOIN_WEBRTC = 0x4304;        //服务器返回视频加入房间



    //秘钥
    public static final String UrlKey= "@ReachCo20171806";
    //文件个数
    public static final int FILE_COUNT = 60; // 文件个数
    
}
